package com.gc;

/**
 * Created by Lxk on 2019/2/26.
 */
class ThreadRunner extends Thread {
    public void run(){
        try{
            System.out.println("start run!!");
            Thread.sleep(10000);
            System.out.println("start run again!!");
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}

public class JoinTest {

    public static void main(String[] args){
        ThreadRunner runner = new ThreadRunner();
        try{
            System.out.println("main start run");
            runner.start();
            runner.join();
            System.out.println("main run here");
        }catch (Exception e){
            e.printStackTrace();
        }
    }

}
